/**
 * 
 */
package util;

import org.jsoup.select.Elements;

/**
 * @author weichuanxi
 * @date 2016年7月4日
 */
public class StrUtil {

	/**
	 * @param prefix
	 *            url前缀
	 * @param e
	 *            image elements
	 * @return
	 */
	public static String imgUrls(String prefix, Elements e) {
		String imgurl = "";
		if (e.size() > 1) {
			for (int i = 0; i < e.size(); i++) {
				imgurl = imgurl + prefix + e.get(0).attr("src") + ">>>";
			}
		} else  if (e.size() == 1){
			imgurl = prefix + e.get(0).attr("src");
		}else{
			imgurl = "";
		}
		return imgurl;
	}
}
